var list = [1, 2, 3, 4, 5];
for (var i = 0; i < list.length; i++) {
  print(list[i]);
}

for (var item in list) {
  print(item);
}

list.forEach((element) {
  print(element);
});

// where 判断大于3, 返回值为(4,5), toList()组成新的list
var newList = list.where((element) => element > 3).toList();
print(newList);

// any 判断list的数据是否有大于3的值，返回值为bool，true
var checkAny = list.any((element) => element > 3);
print(checkAny);

// every 判断list里面的数据是否都大于3，返回值为bool, false
var checkEvery = list.every((element) => element > 3);
print(checkEvery);
